<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<title>Document</title>
	<style>
		* {
			padding: 0;
			margin: 0;
		}
		body {
			background-color: black;
			overflow: hidden;
		}
		p {
			width: 30%;
			min-width: 100px;
			max-width: 200px;
			background-color: yellow;
			text-align: center;
			line-height: 100%;
			margin: 100px auto;
		}
	</style>
</head>
<body>
	<p>开始游戏</p>
</body>
<script>
	console.log(window.innerWidth);
	document.body.width = window.innerWidth;
	document.body.height = window.innerHeight;
	var p = document.querySelector("p");
	p.style.fontSize = p.offsetWidth/5 + "px";
	window.onresize = function(){
		p.style.fontSize = p.offsetWidth/5 + "px";
	}
</script>
</html>